package cn.jianyongjie.basic.query;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
* @Description: 分页类
* @Author: Jian Yongjie
* @Version: 1.0
* @Date:  2022/4/19 18:41
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class BaseQuery {
    // 分页页数
    private Integer currentPage = 1;
    // 每页总条数
    private Integer pageSize = 5;
    // 高级查询条件
    private String keyword;

    private String keywords;

    /*
    * @Title: BaseQuery
    * @Description: 计算初始位置的方法
    * @Author: Jian Yongjie
    * @Version: 1.0
    * @Date:  2022/4/19 18:42
    * @Parameters: * @param
    * @Return java.lang.Integer
    */
    public Integer getBegin(){
     return (this.currentPage-1)*this.pageSize;
    }
}
